package com.hbd.esdemo.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 收获地址
 *
 * @author bdhong
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "ship_address", type = "docs", shards = 1, replicas = 0)
public class ShipAddress {
    @Id
    private Long id;

    /**
     * 姓名
     */
    @Field(type = FieldType.keyword)
    private String name;

    /**
     * 省
     */
    @Field(type = FieldType.text, analyzer = "ik_max_word")
    private String province;

    /**
     * 市
     */
    @Field(type = FieldType.text, analyzer = "ik_max_word")
    private String city;

    /**
     * 区
     */
    @Field(type = FieldType.text, analyzer = "ik_max_word")
    private String area;

    /**
     * 街道
     */
    @Field(type = FieldType.text, analyzer = "ik_max_word")
    private String street;


}
